package home

import (
	"fmt"
	"github.com/gin-gonic/gin"
	"telemple_web/app"
	"telemple_web/app/http/controllers/home/params"
	"telemple_web/app/http/validation"
	"telemple_web/app/utils/response"
)

func Show(ctx *gin.Context) {

	var par params.Show
	if err := ctx.ShouldBind(&par); err != nil {
		response.JSONErr(ctx, response.WithMessage(validation.ValidatorErrorMsg(err, &par)))
		return
	}

	str := app.RedisR().Get(ctx, "abc")
	fmt.Println("Show RedisR str", str)
	response.JSONOk(ctx, response.WithContent(par))
	//data := map[string]interface{}{
	//	"name":    "大山",
	//	"age":     18,
	//	"address": "天堂路120号",
	//}
	//response.JSONOk(ctx, response.WithContent(data))
}
